package fr.afcepf.atod16.groupe1.projet1.dto.client;

import fr.afcepf.atod16.groupe1.projet1.dto.Dto;
import fr.afcepf.atod16.groupe1.projet1.dto.commande.DtoCommande;
import java.util.List;

/**
 * Le DTO compte client
 * @author cedric
 */
public class DtoCompteClient implements Dto {

    private Integer id;
    private String pass;
    private String civilite;
    private String nom;
    private String prenom;
    private String adresse;
    private String codePostal;
    private String ville;
    private String email;
    private String telFixe;
    private String telMobile;
    private Boolean actif;
    private List<DtoCommande> commandes;

    @Override
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getPass() {
        return pass;
    }

    public void setPass(String pass) {
        this.pass = pass;
    }

    public String getCivilite() {
        return civilite;
    }

    public void setCivilite(String civilite) {
        this.civilite = civilite;
    }

    public String getNom() {
        return nom;
    }

    public void setNom(String nom) {
        this.nom = nom;
    }

    public String getPrenom() {
        return prenom;
    }

    public void setPrenom(String prenom) {
        this.prenom = prenom;
    }

    public String getAdresse() {
        return adresse;
    }

    public void setAdresse(String adresse) {
        this.adresse = adresse;
    }

    public String getCodePostal() {
        return codePostal;
    }

    public void setCodePostal(String codePostal) {
        this.codePostal = codePostal;
    }

    public String getVille() {
        return ville;
    }

    public void setVille(String ville) {
        this.ville = ville;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getTelFixe() {
        return telFixe;
    }

    public void setTelFixe(String telFixe) {
        this.telFixe = telFixe;
    }

    public String getTelMobile() {
        return telMobile;
    }

    public void setTelMobile(String telMobile) {
        this.telMobile = telMobile;
    }

    public Boolean getActif() {
        return actif;
    }

    public void setActif(Boolean actif) {
        this.actif = actif;
    }

    public List<DtoCommande> getCommandes() {
        return commandes;
    }

    public void setCommandes(List<DtoCommande> commandes) {
        this.commandes = commandes;
    }

    public DtoCompteClient() {
    }

    public DtoCompteClient(Integer id, String pass, String civilite, String nom, String prenom, String adresse, String codePostal, String ville, String email, String telFixe, String telMobile, Boolean actif, List<DtoCommande> commandes) {
        this.id = id;
        this.pass = pass;
        this.civilite = civilite;
        this.nom = nom;
        this.prenom = prenom;
        this.adresse = adresse;
        this.codePostal = codePostal;
        this.ville = ville;
        this.email = email;
        this.telFixe = telFixe;
        this.telMobile = telMobile;
        this.actif = actif;
        this.commandes = commandes;
    }

    @Override
    public String toString() {
        return "DtoCompteClient{" + "id=" + id + ", pass=" + pass + ", civilite=" + civilite + ", nom=" + nom + ", prenom=" + prenom + ", adresse=" + adresse + ", codePostal=" + codePostal + ", ville=" + ville + ", email=" + email + ", telFixe=" + telFixe + ", telMobile=" + telMobile + ", actif=" + actif + '}';
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 13 * hash + (this.id != null ? this.id.hashCode() : 0);
        hash = 13 * hash + (this.pass != null ? this.pass.hashCode() : 0);
        hash = 13 * hash + (this.civilite != null ? this.civilite.hashCode() : 0);
        hash = 13 * hash + (this.nom != null ? this.nom.hashCode() : 0);
        hash = 13 * hash + (this.prenom != null ? this.prenom.hashCode() : 0);
        hash = 13 * hash + (this.adresse != null ? this.adresse.hashCode() : 0);
        hash = 13 * hash + (this.codePostal != null ? this.codePostal.hashCode() : 0);
        hash = 13 * hash + (this.ville != null ? this.ville.hashCode() : 0);
        hash = 13 * hash + (this.email != null ? this.email.hashCode() : 0);
        hash = 13 * hash + (this.telFixe != null ? this.telFixe.hashCode() : 0);
        hash = 13 * hash + (this.telMobile != null ? this.telMobile.hashCode() : 0);
        hash = 13 * hash + (this.actif != null ? this.actif.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final DtoCompteClient other = (DtoCompteClient) obj;
        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {
            return false;
        }
        if ((this.pass == null) ? (other.pass != null) : !this.pass.equals(other.pass)) {
            return false;
        }
        if ((this.civilite == null) ? (other.civilite != null) : !this.civilite.equals(other.civilite)) {
            return false;
        }
        if ((this.nom == null) ? (other.nom != null) : !this.nom.equals(other.nom)) {
            return false;
        }
        if ((this.prenom == null) ? (other.prenom != null) : !this.prenom.equals(other.prenom)) {
            return false;
        }
        if ((this.adresse == null) ? (other.adresse != null) : !this.adresse.equals(other.adresse)) {
            return false;
        }
        if ((this.codePostal == null) ? (other.codePostal != null) : !this.codePostal.equals(other.codePostal)) {
            return false;
        }
        if ((this.ville == null) ? (other.ville != null) : !this.ville.equals(other.ville)) {
            return false;
        }
        if ((this.email == null) ? (other.email != null) : !this.email.equals(other.email)) {
            return false;
        }
        if ((this.telFixe == null) ? (other.telFixe != null) : !this.telFixe.equals(other.telFixe)) {
            return false;
        }
        if ((this.telMobile == null) ? (other.telMobile != null) : !this.telMobile.equals(other.telMobile)) {
            return false;
        }
        if (this.actif != other.actif && (this.actif == null || !this.actif.equals(other.actif))) {
            return false;
        }
        return true;
    }
}
